package com.baizhi.appController;

import com.baizhi.entity.Audio;
import com.baizhi.service.AudioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("audio")
public class AppAudioController {

    @Autowired
    private AudioService audioService;

    @GetMapping("selectAudioByAlbumId/{id}")
    public List<Audio> selectAudioByAlbumId(@PathVariable("id") Integer id){
        return audioService.selectAudioByAlbumId(id);
    }
}
